package toolsUseCourse.javaFoundation.usuallygrammar;

public class SwitchCase {
/*
结合字节码深入理解switch...case...语句：
https://www.cnblogs.com/wuyuegb2312/p/11172440.html
* */
    public static int test(int i) {

        int result;
        switch (i) {
            case 0:
                result = 0;
                break;
            case 2:
                result = 1;
                break;
            case 10:
                result = 4;
                break;
            default:
                result = -1;
        }
        return result;
    }
}
